#include "bsp_uart.h"
#include "hostComputer.h"


extern UART_HandleTypeDef huart7;

void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
	if( huart->Instance == UART7 )
	{
		HC_RxCallback();
		//host computer callback
	}
}

uint8_t HC_SendData(uint8_t *buf,uint16_t length)
{
	if( HAL_UART_Transmit(&huart7,buf,length,10) != HAL_OK )
	{
		return 1;
	}	
}

void HC_StartRecv(uint8_t *rx_data)
{
	HAL_UART_Receive_IT(&huart7,rx_data,1);
}


